//递归实现n的k次方
# define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int NumPower(int n, int k) {
	if (k == 0) {
		return 1;
	}
	else if (k == 1) {
		return n;
	}
		return n * NumPower(n, k - 1);
}
int main() {
	int n = 0, k = 0;
	printf("请输入底数与指数：");
	scanf("%d %d", &n, &k);
	printf("%d\n", NumPower(n,k));
	system("pause");
	return 0;
}